projects.js ➔ showAllProjects   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 11
rs 9.4285

1 Function

Rating   Name   Duplication   Size   Complexity  
A projects.js ➔ ... ➔ database.getProjects 0 8 2
1
var database = require('./database');
2
var tableName = 'projects';
3
4
5
function showAllProjects(req, res) {
6
    console.log("Getting project data");
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
7
    database.getProjects(tableName, function(err, result) {
8
        if(err) {
9
            console.log("Error: " + err);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
10
        }
11
        else {
12
            res.json({Projects:result});
13
        }
14
    });
15
}
16
17
exports.showAllProjects = showAllProjects;
18